import Vue from 'vue'
import Vuex from 'vuex';
import im from "./NIM"

Vue.use(Vuex);

const store = new Vuex.Store({
    state: {
        usertoken: localStorage.getItem("usertoken"),
        userintro: JSON.parse(localStorage.getItem("userintro")),
         resolution:"MN5"
    },
    mutations: {
        resetstate(state) {
            state.userintro = "",
            state.usertoken = ""
        },
        changestate(state) {
            state.userintro = JSON.parse(localStorage.getItem("userintro")),
                state.usertoken = localStorage.getItem("usertoken")
        }
    },
    modules: {
        im: {
            namespaced: true,
            ...im
        }
    }
})
export default store